﻿
/*
 * Copyright (C) Han Wei
 */


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;


namespace BSvr.PluginProxy
{
    /// <summary>
    /// 将plugin加载进来，同时设置Proxy
    /// </summary>
    class Program
    {
        static int Main(string[] args)
        {
            try
            {
                AppDomain mydomain = System.AppDomain.CurrentDomain;
                string pluginPath = mydomain.SetupInformation.PrivateBinPath;
                string pluginno = mydomain.FriendlyName;

                Proxy.LoadPlugin(pluginno, pluginPath);                              // 加载插件
                
                return 0;
            }
            catch (Exception ex) {
                throw ex;

            }
        }
    }
}
